//题目：有1、2、3、4四个数字，能组成多少个互不相同且无重复数字的三位数？都是多少？
public class Test11 {
    public static void main(String[] args) {
        int sum = 0;
        for (int i = 100; i < 1000; i++) {
            int a = i / 100;
            int b = i / 10 % 10;
            int c = i % 10;
            if ((a <= 4) && (b <= 4) && (c <= 4) && (a >= 1) && (b >= 1) && (c >= 1)) {
                if ((a != b) && (a != c) && (b != c)) {
                    sum++;
                    System.out.print(i + " ");
                }
            }
        }
        System.out.println();
        System.out.print("能组成"+sum+"个互相不同且无重复的三位数");
    }
}
